﻿using System;
using System.Collections.Generic;
using Microsoft.Practices.Unity;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Rhino.Mocks;
using TestByWire.AttributeHandlers;

namespace TestByWire.Test.AttributeHandlers
{
    [TestClass]
    public class AttributeBuildPlanTest
    {
        private AttributeBuildPlan _attributeBuildPlan;

        [TestInitialize]
        public void PerTestSetup()
        {
            _attributeBuildPlan = new AttributeBuildPlan(MockRepository.GenerateStub<IScopeInformation>());
        }

        [TestMethod]
        public void ExecuteMustNotAcceptNullAsContainer()
        {
            var exception = AssertEx.Throws<ArgumentNullException>(() => _attributeBuildPlan.Execute(this, null));

            Assert.AreEqual("container", exception.ParamName);
        }
    }
}